//------------------------------------------------------------------------------
#ifndef __CMYLABEL_H__
#define __CMYLABEL_H__
//------------------------------------------------------------------------------
#include <QtGui>
#include <QLabel>
#include <QString>
#include <QtDesigner/QDesignerExportWidget>
#include "CChampText.h"
//-----------------------------------------------------------------------------------
#ifndef DESIGNER_CONTROL
#define DESIGNER_EXPORT	QDESIGNER_WIDGET_EXPORT
#else
#define DESIGNER_EXPORT
#endif //QDESIGNER_WIDGET_EXPORT
//------------------------------------------------------------------------------
class DESIGNER_EXPORT CMyLabel : public QLabel, public CChampText
{
	Q_OBJECT
#ifndef DESIGNER_CONTROL
	Q_PROPERTY(QString champ READ getChamp WRITE setChamp)
	Q_PROPERTY(QString table READ getTable WRITE setTable)
	Q_PROPERTY(CCommun::EDataType dataType READ getDataType WRITE setDataType)
#endif //DESIGNER_CONTROL
	public:
		CMyLabel(QWidget *parent = 0);
		virtual QString getValue(void);
		virtual void setValue(QVariant value);
		virtual void setStateEnable(bool) {}
		virtual void setAttribut(EAttribut) {}
		virtual void setTextCondition(QString) {}
		virtual bool isEmpty(void);
		virtual void init(void) { setValue(_defaultValue); }
		void setData(QVariant data) { this->data=data; }
		QVariant getData(void) { return data; }
	private:
		QVariant data;
};
//------------------------------------------------------------------------------
#endif //__CMYLABEL_H__
//------------------------------------------------------------------------------